import 'package:fire_chat/constant/length.dart';
import 'package:fire_chat/ui/login/page/login_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';


///开始页面
class StartPage extends StatelessWidget {
  const StartPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(
        BoxConstraints(
            maxWidth: MediaQuery.of(context).size.width,
            maxHeight: MediaQuery.of(context).size.height),
        designSize: const Size(375, 812),
        minTextAdapt: true,
        orientation: Orientation.portrait);
    nextPage();
    return Scaffold(
      body: Image.asset("images/start.png", fit: BoxFit.cover),
    );
  }

  nextPage() {
    Future.delayed(const Duration(milliseconds: 3150), () {
      // if (SpConfig().getUserToken() == "") {
      //   Get.off(LoginPage());
      // } else {
      //   Get.off(HomePage());
      // }
      Get.off(const LoginPage());
    });
  }
}
